home *** CD-ROM | disk | FTP | other *** search
Wrap
xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) NNNNAAAAMMMMEEEE xfsrestore - XFS filesystem incremental restore utility SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS xxxxffffssssrrrreeeessssttttoooorrrreeee [ ----aaaa housekeeping ] [ ----bbbb blocksize (use with minimal rmt flag) ] [ ----cccc media_change_alert_program ] [ ----eeee ] [ ----ffff source ... ] [ ----iiii ] [ ----mmmm force usage of minimal rmt ] [ ----nnnn file ] [ ----oooo ] [ ----pppp report_interval ] [ ----rrrr ] [ ----ssss subtree ... ] [ ----tttt ] [ ----vvvv verbosity ] [ ----AAAA ] [ ----DDDD ] [ ----EEEE ] [ ----FFFF ] [ ----IIII [ subopt=value ... ] ] [ ----JJJJ ] [ ----LLLL session_label ] [ ----OOOO options_file ] [ ----QQQQ ] [ ----RRRR ] [ ----SSSS session_id ] [ ----TTTT ] [ ----YYYY io_ring_length ] [ ---- ] destination DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _x_f_s_r_e_s_t_o_r_e restores filesystems from dumps produced by _x_f_s_d_u_m_p(1M). Two modes of operation are available: simple and cumulative. The default is simple mode. _x_f_s_r_e_s_t_o_r_e populates the specified destination directory, _d_e_s_t_i_n_a_t_i_o_n, with the files contained in the dump media. The ----rrrr option specifies the cumulative mode. Successive invocations of _x_f_s_r_e_s_t_o_r_e are used to apply a chronologically ordered sequence of delta dumps to a base (level 0) dump. The contents of the filesystem at the time each dump was produced is reproduced. This can involve adding, deleting, renaming, linking, and unlinking files and directories. A delta dump is defined as either an incremental dump (_x_f_s_d_u_m_p ----llll option with level > 0) or a resumed dump (_x_f_s_d_u_m_p ----RRRR option). The deltas must be applied in the order they were produced. Each delta applied must have been produced with the previously applied delta as its base. ----aaaa _h_o_u_s_e_k_e_e_p_i_n_g Each invocation of _x_f_s_r_e_s_t_o_r_e creates a directory called _x_f_s_r_e_s_t_o_r_e_h_o_u_s_e_k_e_e_p_i_n_g_d_i_r. This directory is normally created directly under the _d_e_s_t_i_n_a_t_i_o_n directory. The ----aaaa option allows the operator to specify an alternate directory, _h_o_u_s_e_k_e_e_p_i_n_g, in which _x_f_s_r_e_s_t_o_r_e creates the _x_f_s_r_e_s_t_o_r_e_h_o_u_s_e_k_e_e_p_i_n_g directory. When performing a cumulative (----rrrr option) restore, each successive invocation of _x_f_s_r_e_s_t_o_r_e must specify the same alternate directory. ----bbbb _b_l_o_c_k_s_i_z_e Specifies the blocksize to be used for the restore. This option is specified only with the minimal rmt option (see the ----mmmm option below). For a QIC drive , blocksize must always be 512. For other drives such as DAT or 8 mm , the same blocksize used for the xfsdump operation must be specified to restore the tape. When specified , this blocksize applies to all remote tape sources. ----cccc _m_e_d_i_a__c_h_a_n_g_e__a_l_e_r_t__p_r_o_g_r_a_m Use the specified program to alert the operator when a media change is required. The alert program is typically a script to send a mail PPPPaaaaggggeeee 1111 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) or flash a window to draw the operator's attention. ----eeee Prevents _x_f_s_r_e_s_t_o_r_e from overwriting existing files in the _d_e_s_t_i_n_a_t_i_o_n directory. ----ffff _s_o_u_r_c_e Specifies a source of the dump to be restored. This can be the pathname of a device (such as a tape drive), a regular file, or a remote tape drive (see _r_m_t(1M)). Up to 20 sources can be specified. All sources are simultaneously applied to the restore. For example, if the dump to be restored spanned three tapes, three tape drives could be used to simultaneously restore the portions of the dump contained on each tape. All other permutations are supported. This option must be omitted if the standard input option (a lone ---- preceding the _d_e_s_t_i_n_a_t_i_o_n specification) is specified. ----iiii Selects interactive operation. Once the on-media directory hierarchy has been read, an interactive dialogue is begun. The operator uses a small set of commands to peruse the directory hierarchy, selecting files and subtrees for extraction. The available commands are given below. Initially nothing is selected, except for those subtrees specified with ----ssss command line options. llllssss [_a_r_g] List the entries in the current directory or the specified directory, or the specified non-directory file entry. Both the entry's original inode number and name are displayed. Entries that are directories are appended with a `/'. Entries that have been selected for extraction are prepended with a `*'. ccccdddd [_a_r_g] Change the current working directory to the specified argument, or to the filesystem root directory if no argument is specified. ppppwwwwdddd Print the pathname of the current directory, relative to the filesystem root. aaaadddddddd [_a_r_g] The current directory or specified file or directory within the current directory is selected for extraction. If a directory is specified, then it and all its descendents are selected. Entries that are selected for extraction are prepended with a `*' when they are listed by llllssss. ddddeeeelllleeeetttteeee [_a_r_g] The current directory or specified file or directory within the current directory is deselected for extraction. If a directory is specified, then it and all its descendents are deselected. The most expedient way to extract most of the files from a directory is to select the directory and then deselect those files that are not needed. PPPPaaaaggggeeee 2222 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) eeeexxxxttttrrrraaaacccctttt Ends the interactive dialogue, and causes all selected subtrees to be restored. qqqquuuuiiiitttt _x_f_s_r_e_s_t_o_r_e ends the interactive dialogue and immediately exits, even if there are files or subtrees selected for extraction. hhhheeeellllpppp List a summary of the available commands. ----mmmm Use the minimal rmt protocol for remote tape sources. This is used when the remote machine is a non-SGI machine. With this option, _x_f_s_r_e_s_t_o_r_e uses version 1 rmt protocol for all remote tape drives. This option cannot be used without specifying a blocksize to be used (see ----bbbb option above). If all rmt sources are SGI machines, it is preferable nnnnooootttt to specify this option. ----nnnn _f_i_l_e Allows _x_f_s_r_e_s_t_o_r_e to restore only files newer than _f_i_l_e. The modification time of _f_i_l_e (i.e., as displayed with the llllssss ----llll command) is compared to the inode modification time of each file on the source media (i.e., as displayed with the llllssss ----llllcccc command). A file is restored from media only if its inode modification time is greater than or equal to the modification time of _f_i_l_e. ----oooo Restore file and directory owner/group even if not root. When run with an effective user id of root, _x_f_s_r_e_s_t_o_r_e restores owner and group of each file and directory. When run with any other effective user id it does not, unless this option is specified. ----pppp _r_e_p_o_r_t__i_n_t_e_r_v_a_l Causes progress reports to be printed at intervals of _r_e_p_o_r_t__i_n_t_e_r_v_a_l seconds. The interval value is approximate, _x_f_s_r_e_s_t_o_r_e will delay progress reports to avoid undue processing overhead. ----rrrr Selects the cumulative mode of operation. ----ssss _s_u_b_t_r_e_e Specifies a subtree to restore. Any number of ----ssss options are allowed. The restore is constrained to the union of all subtrees specified. Each subtree is specified as a pathname relative to the restore _d_e_s_t_i_n_a_t_i_o_n. If a directory is specified, the directory and all files beneath that directory are restored. ----tttt Displays the contents of the dump, but does not create or modify any files or directories. It may be desirable to set the verbosity level to ssssiiiilllleeeennnntttt when using this option. ----vvvv _v_e_r_b_o_s_i_t_y__l_e_v_e_l Specifies the level of detail of the messages displayed during the course of the restore. The argument can be ssssiiiilllleeeennnntttt, vvvveeeerrrrbbbboooosssseeee, or ttttrrrraaaacccceeee. The default is vvvveeeerrrrbbbboooosssseeee. PPPPaaaaggggeeee 3333 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) ----AAAA Do not restore extended file attributes. If this option is not specified, extended file attributes are restored. Note that dumping of extended file attributes is also optional. ----DDDD Restore DMAPI (Data Management Application Programming Interface) event settings. _x_f_s_d_u_m_p backs backs up these settings, but it is usually not desirable to restore them. ----EEEE Prevents _x_f_s_r_e_s_t_o_r_e from overwriting newer versions of files. The inode modification time of the on-media file is compared to the inode modification time of corresponding file in the _d_e_s_t_i_n_a_t_i_o_n directory. The file is restored only if the on-media version is newer than the version in the _d_e_s_t_i_n_a_t_i_o_n directory. The inode modification time of a file can be displayed with the llllssss ----llllcccc command. ----FFFF Inhibit interactive operator prompts. This option inhibits _x_f_s_r_e_s_t_o_r_e from prompting the operator for verification of the selected dump as the restore target and from prompting for any media change. ----IIII Causes the _x_f_s_d_u_m_p inventory to be displayed (no restore is performed). Each time _x_f_s_d_u_m_p is used, an online inventory in /_v_a_r/_x_f_s_d_u_m_p/_i_n_v_e_n_t_o_r_y is updated. This is used to determine the base for incremental dumps. It is also useful for manually identifying a dump session to be restored (see the ----LLLL and ----SSSS options). Suboptions to filter the inventory display are described later. ----JJJJ Inhibits inventory update when on-media session inventory encountered during restore. _x_f_s_r_e_s_t_o_r_e opportunistically updates the online inventory when it encounters an on-media session inventory, but only if run with an effective user id of root and only if this option is not given. ----LLLL _s_e_s_s_i_o_n__l_a_b_e_l Specifies the label of the dump session to be restored. The source media is searched for this label. It is any arbitrary string up to 255 characters long. The label of the desired dump session can be copied from the inventory display produced by the ----IIII option. ----OOOO _o_p_t_i_o_n_s__f_i_l_e Insert the options contained in _o_p_t_i_o_n_s__f_i_l_e into the beginning of the command line. The options are specified just as they would appear if typed into the command line. In addition, newline characters (\n) can be used as whitespace. The options are placed before all options actually given on the command line, just after the command name. Only one ----OOOO option can be used. Recursive use is ignored. The destination directory cannot be specified in _o_p_t_i_o_n_s__f_i_l_e. PPPPaaaaggggeeee 4444 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) ----QQQQ Force completion of an interrupted restore session. This option is required to work around one specific pathological scenario. When restoring a dump session which was interrupted due to an EOM condition and no online session inventory is available, _x_f_s_r_e_s_t_o_r_e cannot know when the restore of that dump session is complete. The operator is forced to interrupt the restore session. In that case, if the operator tries to subsequently apply a resumed dump (using the ----rrrr option), _x_f_s_r_e_s_t_o_r_e refuses to do so. The operator must tell _x_f_s_r_e_s_t_o_r_e to consider the base restore complete by using this option when applying the resumed dump. ----RRRR Resume a previously interrupted restore. _x_f_s_r_e_s_t_o_r_e can be interrupted at any time by pressing the terminal interrupt character (see _s_t_t_y(1)). Use this option to resume the restore. The ----aaaa and _d_e_s_t_i_n_a_t_i_o_n options must be the same. ----SSSS _s_e_s_s_i_o_n__i_d Specifies the session UUID of the dump session to be restored. The source media is searched for this UUID. The UUID of the desired dump session can be copied from the inventory display produced by the ----IIII option. ----TTTT Inhibits interactive dialogue timeouts. _x_f_s_r_e_s_t_o_r_e prompts the operator for media changes. This dialogue normally times out if no response is supplied. This option prevents the timeout. ----XXXX _s_u_b_t_r_e_e Specifies a subtree to exclude. This is the converse of the ----ssss option. Any number of ----XXXX options are allowed. Each subtree is specified as a pathname relative to the restore _d_e_s_t_i_n_a_t_i_o_n. If a directory is specified, the directory and all files beneath that directory are excluded. ----YYYY _i_o__r_i_n_g__l_e_n_g_t_h Specify I/O buffer ring length. _x_f_s_r_e_s_t_o_r_e uses a ring of input buffers to achieve maximum throughput when restoring from tape drives. The default ring length is 3. ---- A lone ---- causes the standard input to be read as the source of the dump to be restored. Standard input can be a pipe from another utility (such as _x_f_s_d_u_m_p(1M)) or a redirected file. This option cannot be used with the ----ffff option. The ---- must follow all other options, and precede the _d_e_s_t_i_n_a_t_i_o_n specification. The dumped filesystem is restored into the _d_e_s_t_i_n_a_t_i_o_n directory. There is no default; the _d_e_s_t_i_n_a_t_i_o_n must be specified. NNNNOOOOTTTTEEEESSSS CCCCuuuummmmuuuullllaaaattttiiiivvvveeee RRRReeeessssttttoooorrrraaaattttiiiioooonnnn A base (level 0) dump and an ordered set of delta dumps can be sequentially restored, each on top of the previous, to reproduce the contents of the original filesystem at the time the last delta was PPPPaaaaggggeeee 5555 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) produced. The operator invokes _x_f_s_r_e_s_t_o_r_e once for each dump. The ----rrrr option must be specified. The _d_e_s_t_i_n_a_t_i_o_n directory must be the same for all invocations. Each invocation leaves a directory named _x_f_s_r_e_s_t_o_r_e_h_o_u_s_e_k_e_e_p_i_n_g in the _d_e_s_t_i_n_a_t_i_o_n directory (however, see the ----aaaa option above). This directory contains the state information that must be communicated between invocations. The operator must remove this directory after the last delta has been applied. _x_f_s_r_e_s_t_o_r_e also generates a directory named _o_r_p_h_a_n_a_g_e in the _d_e_s_t_i_n_a_t_i_o_n directory. _x_f_s_r_e_s_t_o_r_e removes this directory after completing a simple restore. However, if _o_r_p_h_a_n_a_g_e is not empty, it is not removed. This can happen if files present on the dump media are not referenced by any of the restored directories. The _o_r_p_h_a_n_a_g_e has an entry for each such file. The entry name is the file's original inode number, a ".", and the file's generation count modulo 4096 (only the lower 12 bits of the generation count are used). _x_f_s_r_e_s_t_o_r_e does not remove the _o_r_p_h_a_n_a_g_e after cumulative restores. Like the _x_f_s_r_e_s_t_o_r_e_h_o_u_s_e_k_e_e_p_i_n_g directory, the operator must remove it after applying all delta dumps. MMMMeeeeddddiiiiaaaa MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt A dump consists of one or more media files contained on one or more media objects. A media file contains all or a portion of the filesystem dump. Large filesystems are broken up into multiple media files to minimize the impact of media dropouts, and to accommodate media object boundaries (end-of-media). A media object is any storage medium: a tape cartridge, a remote tape device (see _r_m_t(1M)), a regular file, or the standard input (currently other removable media drives are not supported). Tape cartridges can contain multiple media files, which are typically separated by (in tape parlance) file marks. If a dump spans multiple media objects, the restore must begin with the media object containing the first media file dumped. The operator is prompted when the next media object is needed. Media objects can contain more than one dump. The operator can select the desired dump by specifying the dump label (----LLLL option), or by specifying the dump UUID (----SSSS option). If neither is specified, _x_f_s_r_e_s_t_o_r_e scans the entire media object, prompting the operator as each dump session is encountered. The inventory display (----IIII option) is useful for identifying the media objects required. It is also useful for identifying a dump session. The session UUID can be copied from the inventory display to the ----SSSS option argument to unambiguously identify a dump session to be restored. Dumps placed in regular files or the standard output do not span multiple media objects, nor do they contain multiple dumps. PPPPaaaaggggeeee 6666 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) IIIInnnnvvvveeeennnnttttoooorrrryyyy Each dump session updates an inventory database in /_v_a_r/_x_f_s_d_u_m_p/_i_n_v_e_n_t_o_r_y. This database can be displayed by invoking _x_f_s_r_e_s_t_o_r_e with the ----IIII option. The display uses tabbed indentation to present the inventory hierarchically. The first level is filesystem. The second level is session. The third level is media stream (currently only one stream is supported). The fourth level lists the media files sequentially composing the stream. The following suboptions are available to filter the display. ----IIII ddddeeeepppptttthhhh====_n (where _n is 1, 2, or 3) limits the hierarchical depth of the display. When _n is 1, only the filesystem information from the inventory is displayed. When _n is 2, only filesystem and session information are displayed. When _n is 3, only filesystem, session and stream information are displayed. ----IIII lllleeeevvvveeeellll====_n (where _n is the dump level) limits the display to dumps of that particular dump level. The display may be restricted to media files contained in a specific media object. ----IIII mmmmoooobbbbjjjjiiiidddd====_v_a_l_u_e (where _v_a_l_u_e is a media ID) specifies the media object by its media ID. ----IIII mmmmoooobbbbjjjjllllaaaabbbbeeeellll====_v_a_l_u_e (where _v_a_l_u_e is a media label) specifies the media object by its media label. Similarly, the display can be restricted to a specific filesystem. ----IIII mmmmnnnntttt====_h_o_s_t-_q_u_a_l_i_f_i_e_d__m_o_u_n_t__p_o_i_n_t__p_a_t_h_n_a_m_e (that is, hostname:pathname), identifies the filesystem by mountpoint. ----IIII ffffssssiiiidddd====_f_i_l_e_s_y_s_t_e_m__i_d identifies the filesystem by filesystem ID. ----IIII ddddeeeevvvv====_h_o_s_t-_q_u_a_l_i_f_i_e_d__d_e_v_i_c_e__p_a_t_h_n_a_m_e (that is, hostname:device_pathname) identifies the filesystem by device. More than one of these suboptions, separated by commas, may be specified at the same time to limit the display of the inventory to those dumps of interest. However, at most four suboptions can be specified at once: one to constrain the display hierarchy depth, one to constrain the dump level, one to constrain the media object, and one to constrain the filesystem. PPPPaaaaggggeeee 7777 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) For example, ----IIII ddddeeeepppptttthhhh====1111,,,,mmmmoooobbbbjjjjllllaaaabbbbeeeellll====""""ttttaaaappppeeee 1111"""",,,,mmmmnnnntttt====hhhhoooosssstttt1111::::////tttteeeesssstttt____mmmmnnnntttt would display only the filesystem information (depth=1) for those filesystems that were mounted on _h_o_s_t_1:/_t_e_s_t__m_n_t at the time of the dump, and only those filesystems dumped to the media object labeled "tape 1". Dump records may be removed (pruned) from the inventory using the _x_f_s_i_n_v_u_t_i_l program. An additional media file is placed at the end of each dump stream. This media file contains the inventory information for the current dump session. This is currently unused. MMMMeeeeddddiiiiaaaa EEEErrrrrrrroooorrrrssss _x_f_s_d_u_m_p is tolerant of media errors, but cannot do error correction. If a media error occurs in the body of a media file, the filesystem file represented at that point is lost. The bad portion of the media is skipped, and the restoration resumes at the next filesystem file after the bad portion of the media. If a media error occurs in the beginning of the media file, the entire media file is lost. For this reason, large dumps are broken into a number of reasonably sized media files. The restore resumes with the next media file. QQQQuuuuoooottttaaaassss When _x_f_s_d_u_m_p dumps a filesystem with quotas, it creates a file in the root of the dump called _x_f_s_d_u_m_p__q_u_o_t_a_s. _x_f_s_r_e_s_t_o_r_e can restore this file like any other file included in the dump. This file can be processed by the _e_d_q_u_o_t_a(1M) command to reactivate the quotas. However, the _x_f_s_d_u_m_p__q_u_o_t_a_s file contains information which may first require modification; specifically the filesystem name and the user ids. If you are restoring the quotas for the same users on the same filesystem from which the dump was taken, then no modification will be necessary. However, if you are restoring the dump to a different filesystem, you will need to: oooo ensure the new filesystem is mounted with the qqqquuuuoooottttaaaa option oooo modify the _x_f_s_d_u_m_p__q_u_o_t_a_s file to contain the new filesystem name oooo ensure the uids in the _x_f_s_d_u_m_p__q_u_o_t_a_s file are correct Once the quota information has been verified, /usr/etc/edquota -i xfsdump_quotas will apply the quota limits to the filesystem. TTTTrrrruuuusssstttteeeedddd IIIIRRRRIIIIXXXX RRRReeeessssttttrrrriiiiccccttttiiiioooonnnnssss In the Trusted IRIX environment, xxxxffffssssrrrreeeessssttttoooorrrreeee can only correctly restore files of a multi-level directory from the dump file generated by xxxxffffssssdddduuuummmmpppp when xxxxffffssssrrrreeeessssttttoooorrrreeee is run at a moldy process label and with the following PPPPaaaaggggeeee 8888 xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) xxxxffffssssrrrreeeessssttttoooorrrreeee((((1111MMMM)))) set of capabilities: CCCCAAAAPPPP____MMMMAAAACCCC____RRRREEEEAAAADDDD , CCCCAAAAPPPP____MMMMAAAACCCC____WWWWRRRRIIIITTTTEEEE , and CCCCAAAAPPPP____DDDDEEEEVVVVIIIICCCCEEEE____MMMMGGGGTTTT.... FFFFIIIILLLLEEEESSSS /var/xfsdump/inventory dump inventory database SSSSEEEEEEEE AAAALLLLSSSSOOOO edquota(1M), rmt(1M), xfsdump(1M), xfsinvutil(1M), attr_set(2), quotas(4). DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS The exit code is 0 on normal completion, and non-zero if an error occurred or the restore was terminated by the operator. BBBBUUUUGGGGSSSS Pathnames of restored non-directory files (relative to the _d_e_s_t_i_n_a_t_i_o_n directory) must be 1023 characters (MAXPATHLEN) or less. Longer pathnames are discarded and a warning message displayed. There is no verify option to _x_f_s_r_e_s_t_o_r_e. This would allow the operator to compare a filesystem dump to an existing filesystem, without actually doing a restore. The interactive commands (----iiii option) do not understand regular expressions. When the minimal rmt option is specified, _x_f_s_r_e_s_t_o_r_e applies it to all remote tape sources. The same blocksize (specified by the ----bbbb option) is used for all these remote drives. _x_f_s_r_e_s_t_o_r_e uses the alert program only when a media change is required. Cumulative mode (----rrrr option) requires that the operator invoke _x_f_s_r_e_s_t_o_r_e for the base and for each delta to be applied in sequence to the base. It would be better to allow the operator to identify the last delta in the sequence of interest, and let _x_f_s_r_e_s_t_o_r_e work backwards from that delta to identify and apply the preceding deltas and base dump, all in one invocation. PPPPaaaaggggeeee 9999